sep_start;echo 'libudev:preprocess src files'
for libudev_src_file in $libudev_src_files
do
    libudev_pp_c_file=${libudev_src_file%.c}
    libudev_pp_c_file=${libudev_pp_c_file}.pp.c
    echo "LIBUDEV_CPP $libudev_src_file->$libudev_pp_c_file"
    mkdir -p $(dirname $libudev_pp_c_file)
    $libudev_cpp $CPPFLAGS -I. -I$src_path -o $libudev_pp_c_file \
                                                 $src_path/src/$libudev_src_file
    libudev_pp_c_files="$libudev_pp_c_file $libudev_pp_c_files"
done
sep_end

################################################################################

sep_start;echo 'libudev:compile preprocessed src files'
for libudev_pp_c_file in $libudev_pp_c_files
do
    libudev_obj_file=${libudev_pp_c_file%.pp.c}
    libudev_obj_file=${libudev_obj_file}.o
    echo "LIBUDEV_CC $libudev_pp_c_file-->$libudev_obj_file"
    $libudev_cc $CFLAGS -o $libudev_obj_file $libudev_pp_c_file
    libudev_obj_files="$libudev_obj_file $libudev_obj_files"
done
sep_end

################################################################################

sep_start;echo 'libudev:link the object files to produce the shared library'
echo "LIBUDEV_CCLD libudev.so.${libudev_api}.0.0"
mkdir -p -- "$fake_root/$e_libdir"
$libudev_ccld -o "$fake_root/$e_libdir/libudev.so.${libudev_api}.0.0" $libudev_obj_files
ln -sf libudev.so.${libudev_api}.0.0 "$fake_root/$e_libdir/libudev.so.$libudev_api"
sep_end

################################################################################

sep_start;echo 'libudev:fake installing headers'
mkdir -p -- "$fake_root/$e_includedir"
cp -f "$src_path/src/libudev.h" "$fake_root/$e_includedir"
sep_end
